SlideShare a Scribd company logo
Building nTier Applications with Entity Framework ServicesPart 2
Building nTier Applications with Entity Framework Services (Part 2)
Check Out Your Local User Groups!San Diego Cloud Computing User Groupwww.azureusergroup.com/group/sandiegoazureusergroupSan Diego .NET Developers Groupwww.sddotnetdg.orgSan Diego .NET User Groupwww.sandiegodotnet.comSan Diego SQL Server User Groupwww.sdsqlug.org
Win Free Software!RulesProvide your business card (or email and name)*Indicate on the back what software you are interested inOtherwise I will pick Winners will be picked next week*Yes, most likely I’m going to send you and email about my user group (sddotnetdg.org) and or web site (dotNetTips.com)PrizesCodeRush and Refactor Pro from DevExpress (4)SecondCopy (automatic backup software) (5) *CodeIt.Right Standard from SubMain (4)*Requires mailing address and phone number
Agenda
Exposing your Data over the wire (internet)Service Layer
User ExperienceSecurityActive Directory, Card Space,  Windows Identity FoundationUI ComponentsWindows Forms, Windows Presentation Foundation, ASP.NET (AJAX, MVC), Silverlight, Windows MobilePresentation LayerLocal Storage/ CacheCommunications LayerWindows Communication Foundation (WCF), WCF Data Services, Web Services, Sync Services, Azure (Cloud), RIA Services, Workflow ServicesBusiness LayerBusiness EntitiesT4 TemplatesBusiness ComponentsBusiness WorkflowWindows Workflow FoundationData LayerEntity Framework, LINQ to SQL, DataSetsSQL Server
SOAP IssuesComplexSlowHeavyweightTied to development tools and librariesNot supported universallyCross-vendor/platform interoperability NOT perfect
REST == Architectural Stylefor connecting distributed applicationsServer-side resources identified by URIAccess resources over HTTP/ HTTPSReturned data is “plain”: Atom, plain-XML or JSON
What is REST?Representational State TransferAn architectural style developed by Roy FieldingResource based not RPC basedBased on HTTPStandard resource formatsStateless communication between client and serverGET, POST, PUT, DELETEAddressable resources + hyperlinking
XMLXMLJSONJSONHow REST WorksClientServerURLResourcesVERB (GET, POST, PUT, DELETE)Resource 1RepresentationResource 2StatusRepresentation
What is OData?Protocol for sharing data via HTTP, AtomPub and JSONOpenA way to break down data silos The ATOMPub and JSON format used by “Astoria” or WCF Data Services
Data Services ClientsHTTP(Open Data Protocol)WCF Data ServicesSQL Server 2008 Reporting ServicesWindows Azure Table Storage
OData SDK – Client Library(March 2010)OData JavaScript LibraryOData SDK for PHPRestlet ext. for JavaOData client lib for WP7OData SDK for ObjCData Services update for .NET 3.5 SP1.NET 4.0Silverlight 4.0
OData ConsumersModern web browsersOData explorerExcel 2010 – PowerPivotLINQPadSesame
Easily Expose Your EntitiesWCF Data Services & OData
WCF Data Services OverviewFramework from Microsoft that that facilitates the creation of RESTful data services via HTTP endpointsShipped with .NET 3.5 SP1Updates for 3.1 SP1 and .NET 4.0Built on top of WCF4Data representation in ATOM or JSON
WCF Data Services OverviewAutomates the exposure of data as RESTful resourcesAnything that implements IQueryable<T> and IUpdatable<T>Entity Framework3rd party ORMsLINQ to SQL, custom data driven CLR classesCustom URI based querying
HTTPOpen Data Protocol (OData)Hosting/HTTP ListenerData Services RuntimeData Access LayerEntityFrameworkCustom LINQ ProviderRelational DatabaseOther Sources
WCF 4Programming ModelCore ServicesWeb HTTP ServicesData ServicesRIA ServicesWorkflow ServicesService ModelData ContractService ContractService  BehaviorChannel ModelFormats(Atom, JSON, XML,…)Transports(HTTP, TCP, …)Protocols(SOAP, HTTP, Open Data Protocol,…)
URL ConventionsAddressing entities and setsPresentation options
Service OperationsAdditional way to expose resources via URIs[WebGet] is used for an addressable query[WebInvoke] is used for insert, update, and deleteCan return a scalar valueIEnumerable or IQueryable Astoria’s URI exposes the Service OperationIf you use IQueryable you can append query strings to the URI
Building nTier Applications with Entity Framework Services (Part 2)
Data InterceptorsQuery InterceptorsLogic that will run when a resource is requestedCan be used to limit the data viewed, log, or perform security checkChange InterceptorsLogic that will run when a change (Add/Edit/Delete) request is made
Building nTier Applications with Entity Framework Services (Part 2)
Securing WCF Data ServicesUsing the Host’s authentication modelRole  based authorizationEntitySetRightsHiding Sensitive Data[IgnoreProperties]QueryInterceptorsServiceOperations to validate usersBrute force: HTTPS, SSL, IP FilteringSQL Server Security should not be ignored either!
What’s New in .NET 4Data BindingNew DataServiceCollection class provides simplified binding of data service data to (WPF) controls. Includes auto updating.Counting Entities in an Set $count - total number of resources returned by a URI$inlinecount - total resource count together with the resource dataServer-driven Paging Service can be configured to return requested resources as a set of paged responses
JSON/XMLHTTP/RESTWCF  Data ServiceDataServiceContextData BindingHTTP/RESTEntity FrameworkObjectContext availableObjectContext not availableDistributed system – WCF Data serviceSQL Server 2008
What’s New in .NET 4Query ProjectionsQuery results can be modified to include only a subset of properties by using the new $select query option.Custom Data Service ProvidersCan implement a set of new data service provider interfaces, you can use various types of data with a data service, even when the data model changes during execution.Streaming of Binary ResourcesThis enables you to retrieve and save binary large object data independent of the entity to which it belongs.
Building nTier Applications with Entity Framework Services (Part 2)
Summary

More Related Content

What's hot (20)

PPTX
Ch06 ado.net fundamentals
Madhuri Kavade
 
PPT
Data Access Technologies
Dimara Hakim
 
PPTX
Building nTier Applications with Entity Framework Services
David McCarter
 
PPTX
Ado .net
Manish Singh
 
PDF
JAM819 - Native API Deep Dive: Data Storage and Retrieval
Dr. Ranbijay Kumar
 
PPT
ASP.NET 09 - ADO.NET
Randy Connolly
 
PPT
Database programming in vb net
Zishan yousaf
 
PPT
For Beginers - ADO.Net
Snehal Harawande
 
PPT
ADO.NET
Wani Zahoor
 
PPTX
5.C#
Raghu nath
 
PPSX
ADO.NET
Farzad Wadia
 
PPT
Ado.net
Iblesoft
 
PPTX
Ado.Net Tutorial
prabhu rajendran
 
PPTX
ASP.NET Lecture 4
Julie Iskander
 
PDF
Oracle to vb 6.0 connectivity
rohit vishwakarma
 
PPT
ASP.NET 08 - Data Binding And Representation
Randy Connolly
 
PPTX
Chapter 14
application developer
 
PDF
Data Binding
LAY Leangsros
 
PPT
Data management with ado
Dinesh kumar
 
PPT
Introduction to ado
Harman Bajwa
 
Ch06 ado.net fundamentals
Madhuri Kavade
 
Data Access Technologies
Dimara Hakim
 
Building nTier Applications with Entity Framework Services
David McCarter
 
Ado .net
Manish Singh
 
JAM819 - Native API Deep Dive: Data Storage and Retrieval
Dr. Ranbijay Kumar
 
ASP.NET 09 - ADO.NET
Randy Connolly
 
Database programming in vb net
Zishan yousaf
 
For Beginers - ADO.Net
Snehal Harawande
 
ADO.NET
Wani Zahoor
 
ADO.NET
Farzad Wadia
 
Ado.net
Iblesoft
 
Ado.Net Tutorial
prabhu rajendran
 
ASP.NET Lecture 4
Julie Iskander
 
Oracle to vb 6.0 connectivity
rohit vishwakarma
 
ASP.NET 08 - Data Binding And Representation
Randy Connolly
 
Data Binding
LAY Leangsros
 
Data management with ado
Dinesh kumar
 
Introduction to ado
Harman Bajwa
 

Similar to Building nTier Applications with Entity Framework Services (Part 2) (20)

PPTX
Practical OData
Vagif Abilov
 
PPT
ADO.NET Data Services
ukdpe
 
PPT
Time for a REST - .NET Framework v3.5 & RESTful Web Services
ukdpe
 
PPT
Ado.Net Data Services (Astoria)
Igor Moochnick
 
PPT
Windows Azure and a little SQL Data Services
ukdpe
 
PPTX
Data asservice
Dhananjay Kumar
 
PPTX
IoT Smart Home
Sergey Seletsky
 
PPTX
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
PPT
What's New for Data?
ukdpe
 
PPT
Building RESTful Applications with OData
Todd Anglin
 
PDF
IRJET- Rest API for E-Commerce Site
IRJET Journal
 
PPTX
jQuery and OData - Perfect Together
David Hoerster
 
PPT
MSDN Dec2007
guest1d32f3
 
PDF
Bt0083 server side programing
Techglyphs
 
PDF
70487.pdf
Karen Benoit
 
PPT
Technology Overview
Liran Zelkha
 
PPT
B_110500002
Vaibhav Chavan
 
ODP
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
sumedha.r
 
PPT
Saying goodbye to SQL Server 2000
ukdpe
 
PPTX
What you need to know about .NET Core 3.0 and beyond
Jon Galloway
 
Practical OData
Vagif Abilov
 
ADO.NET Data Services
ukdpe
 
Time for a REST - .NET Framework v3.5 & RESTful Web Services
ukdpe
 
Ado.Net Data Services (Astoria)
Igor Moochnick
 
Windows Azure and a little SQL Data Services
ukdpe
 
Data asservice
Dhananjay Kumar
 
IoT Smart Home
Sergey Seletsky
 
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
What's New for Data?
ukdpe
 
Building RESTful Applications with OData
Todd Anglin
 
IRJET- Rest API for E-Commerce Site
IRJET Journal
 
jQuery and OData - Perfect Together
David Hoerster
 
MSDN Dec2007
guest1d32f3
 
Bt0083 server side programing
Techglyphs
 
70487.pdf
Karen Benoit
 
Technology Overview
Liran Zelkha
 
B_110500002
Vaibhav Chavan
 
Creating Flexible Data Services For Enterprise Soa With Wso2 Data Services
sumedha.r
 
Saying goodbye to SQL Server 2000
ukdpe
 
What you need to know about .NET Core 3.0 and beyond
Jon Galloway
 
Ad

More from David McCarter (15)

PPTX
Röck Yoür Technical Interview - V3
David McCarter
 
PPTX
Rock Your Code With Code Contracts -2013
David McCarter
 
PPTX
Rock Your Code with Code Contracts
David McCarter
 
PDF
.NET Coding Standards For The Real World (2012)
David McCarter
 
PPTX
Back-2-Basics: Code Contracts
David McCarter
 
PPTX
Back-2-Basics: .NET Coding Standards For The Real World (2011)
David McCarter
 
PPTX
How To Survive The Technical Interview
David McCarter
 
PPTX
Real World API Design Using The Entity Framework Services
David McCarter
 
PPTX
Code Easier With Visual Studio 2010 & Extensions
David McCarter
 
PPTX
Back-2-Basics: Exception & Event Instrumentation in .NET
David McCarter
 
PPTX
Building nTier Applications with Entity Framework Services (Part 1)
David McCarter
 
PPTX
Back-2-Basics: .NET Coding Standards For The Real World
David McCarter
 
PPTX
Back-2-Basics: Exception & Event Instrumentation in .NET
David McCarter
 
PPTX
Back-2-Basics: .NET Coding Standards For The Real World
David McCarter
 
PPTX
Building N Tier Applications With Entity Framework Services 2010
David McCarter
 
Röck Yoür Technical Interview - V3
David McCarter
 
Rock Your Code With Code Contracts -2013
David McCarter
 
Rock Your Code with Code Contracts
David McCarter
 
.NET Coding Standards For The Real World (2012)
David McCarter
 
Back-2-Basics: Code Contracts
David McCarter
 
Back-2-Basics: .NET Coding Standards For The Real World (2011)
David McCarter
 
How To Survive The Technical Interview
David McCarter
 
Real World API Design Using The Entity Framework Services
David McCarter
 
Code Easier With Visual Studio 2010 & Extensions
David McCarter
 
Back-2-Basics: Exception & Event Instrumentation in .NET
David McCarter
 
Building nTier Applications with Entity Framework Services (Part 1)
David McCarter
 
Back-2-Basics: .NET Coding Standards For The Real World
David McCarter
 
Back-2-Basics: Exception & Event Instrumentation in .NET
David McCarter
 
Back-2-Basics: .NET Coding Standards For The Real World
David McCarter
 
Building N Tier Applications With Entity Framework Services 2010
David McCarter
 
Ad

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 

Building nTier Applications with Entity Framework Services (Part 2)

  • 1. Building nTier Applications with Entity Framework ServicesPart 2
  • 3. Check Out Your Local User Groups!San Diego Cloud Computing User Groupwww.azureusergroup.com/group/sandiegoazureusergroupSan Diego .NET Developers Groupwww.sddotnetdg.orgSan Diego .NET User Groupwww.sandiegodotnet.comSan Diego SQL Server User Groupwww.sdsqlug.org
  • 4. Win Free Software!RulesProvide your business card (or email and name)*Indicate on the back what software you are interested inOtherwise I will pick Winners will be picked next week*Yes, most likely I’m going to send you and email about my user group (sddotnetdg.org) and or web site (dotNetTips.com)PrizesCodeRush and Refactor Pro from DevExpress (4)SecondCopy (automatic backup software) (5) *CodeIt.Right Standard from SubMain (4)*Requires mailing address and phone number
  • 6. Exposing your Data over the wire (internet)Service Layer
  • 7. User ExperienceSecurityActive Directory, Card Space, Windows Identity FoundationUI ComponentsWindows Forms, Windows Presentation Foundation, ASP.NET (AJAX, MVC), Silverlight, Windows MobilePresentation LayerLocal Storage/ CacheCommunications LayerWindows Communication Foundation (WCF), WCF Data Services, Web Services, Sync Services, Azure (Cloud), RIA Services, Workflow ServicesBusiness LayerBusiness EntitiesT4 TemplatesBusiness ComponentsBusiness WorkflowWindows Workflow FoundationData LayerEntity Framework, LINQ to SQL, DataSetsSQL Server
  • 8. SOAP IssuesComplexSlowHeavyweightTied to development tools and librariesNot supported universallyCross-vendor/platform interoperability NOT perfect
  • 9. REST == Architectural Stylefor connecting distributed applicationsServer-side resources identified by URIAccess resources over HTTP/ HTTPSReturned data is “plain”: Atom, plain-XML or JSON
  • 10. What is REST?Representational State TransferAn architectural style developed by Roy FieldingResource based not RPC basedBased on HTTPStandard resource formatsStateless communication between client and serverGET, POST, PUT, DELETEAddressable resources + hyperlinking
  • 11. XMLXMLJSONJSONHow REST WorksClientServerURLResourcesVERB (GET, POST, PUT, DELETE)Resource 1RepresentationResource 2StatusRepresentation
  • 12. What is OData?Protocol for sharing data via HTTP, AtomPub and JSONOpenA way to break down data silos The ATOMPub and JSON format used by “Astoria” or WCF Data Services
  • 13. Data Services ClientsHTTP(Open Data Protocol)WCF Data ServicesSQL Server 2008 Reporting ServicesWindows Azure Table Storage
  • 14. OData SDK – Client Library(March 2010)OData JavaScript LibraryOData SDK for PHPRestlet ext. for JavaOData client lib for WP7OData SDK for ObjCData Services update for .NET 3.5 SP1.NET 4.0Silverlight 4.0
  • 15. OData ConsumersModern web browsersOData explorerExcel 2010 – PowerPivotLINQPadSesame
  • 16. Easily Expose Your EntitiesWCF Data Services & OData
  • 17. WCF Data Services OverviewFramework from Microsoft that that facilitates the creation of RESTful data services via HTTP endpointsShipped with .NET 3.5 SP1Updates for 3.1 SP1 and .NET 4.0Built on top of WCF4Data representation in ATOM or JSON
  • 18. WCF Data Services OverviewAutomates the exposure of data as RESTful resourcesAnything that implements IQueryable<T> and IUpdatable<T>Entity Framework3rd party ORMsLINQ to SQL, custom data driven CLR classesCustom URI based querying
  • 19. HTTPOpen Data Protocol (OData)Hosting/HTTP ListenerData Services RuntimeData Access LayerEntityFrameworkCustom LINQ ProviderRelational DatabaseOther Sources
  • 20. WCF 4Programming ModelCore ServicesWeb HTTP ServicesData ServicesRIA ServicesWorkflow ServicesService ModelData ContractService ContractService BehaviorChannel ModelFormats(Atom, JSON, XML,…)Transports(HTTP, TCP, …)Protocols(SOAP, HTTP, Open Data Protocol,…)
  • 21. URL ConventionsAddressing entities and setsPresentation options
  • 22. Service OperationsAdditional way to expose resources via URIs[WebGet] is used for an addressable query[WebInvoke] is used for insert, update, and deleteCan return a scalar valueIEnumerable or IQueryable Astoria’s URI exposes the Service OperationIf you use IQueryable you can append query strings to the URI
  • 24. Data InterceptorsQuery InterceptorsLogic that will run when a resource is requestedCan be used to limit the data viewed, log, or perform security checkChange InterceptorsLogic that will run when a change (Add/Edit/Delete) request is made
  • 26. Securing WCF Data ServicesUsing the Host’s authentication modelRole based authorizationEntitySetRightsHiding Sensitive Data[IgnoreProperties]QueryInterceptorsServiceOperations to validate usersBrute force: HTTPS, SSL, IP FilteringSQL Server Security should not be ignored either!
  • 27. What’s New in .NET 4Data BindingNew DataServiceCollection class provides simplified binding of data service data to (WPF) controls. Includes auto updating.Counting Entities in an Set $count - total number of resources returned by a URI$inlinecount - total resource count together with the resource dataServer-driven Paging Service can be configured to return requested resources as a set of paged responses
  • 28. JSON/XMLHTTP/RESTWCF Data ServiceDataServiceContextData BindingHTTP/RESTEntity FrameworkObjectContext availableObjectContext not availableDistributed system – WCF Data serviceSQL Server 2008
  • 29. What’s New in .NET 4Query ProjectionsQuery results can be modified to include only a subset of properties by using the new $select query option.Custom Data Service ProvidersCan implement a set of new data service provider interfaces, you can use various types of data with a data service, even when the data model changes during execution.Streaming of Binary ResourcesThis enables you to retrieve and save binary large object data independent of the entity to which it belongs.
  • 32. ResourcesWCF Data Services Learning Guide:http://msdn.microsoft.com/en-us/data/bb931106.aspxWCF Data Services Team Bloghttp://blogs.msdn.com/astoriateam

Editor's Notes

  • #7: Goals:To show a new way of serving up dateGet you thinking to learn more when you leave this presentation
  • #16: BrowsersMost modern browsers allow you to browse Atom based feeds. Simply point your browser at one of the OData producers.OData ExplorerA Silverlight application that can browse OData Services. It is available as part of the OData SDK Code Samples, and is available online at Silverlight.net/ODataExplorer.Excel 2010PowerPivot for Excel 2010 is a plugin to Excel 2010 that has OData support built-in.LINQPadLINQPad is a tool for building OData queries interactively.SesameA preview version of Fabrice Marguerie&apos;s OData Browser.Client LibrariesClient libraries are programming libraries that make it easy to consume OData services. We already have libraries that target:JavascriptPHPJavaWindows Phone 7 SeriesiPhone (Objective C).NET
  • #23: Demo: AdvertureWorksServiceDemo: AdventureWorks.Client
  • #25: Demo: AdvertureWorksServiceDemo: AdventureWorks.Client
  • #27: Demo: AdvertureWorksServiceDemo: AdventureWorks.Client
  • #32: Demo: AdvertureWorksServiceDemo: AdventureWorks.Client